import {BaseUrl} from "../constant/constant";
import {ApiFetch} from "../api/apiHandler";

class PlanModel {

    constructor() {
        this.url = BaseUrl
        // this.url = 'http://101.200.142.211:3580/'

    }

    allApply(params) {
        let end = this.url + 'getspecialistapple'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    review(params) {
        let end = this.url + 'allowspecialistapple'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    allQuiz(params = {Pid: -1}) {
        let end = this.url + 'getproblem'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    addQuiz(params) {
        let end = this.url + 'addproblem'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    deleteQuiz(params) {
        let end = this.url + 'deleteproblem'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    getPlans(params) {
        let end = this.url + 'getscheme'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    hide(params) {
        let end = this.url + 'changescheme'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }
}

export default PlanModel
